<template>
  <div class="home-banner">
    <XtxCarousel :sliders="sliders"
      autoPlay />
  </div>
</template>

<script>
// 引入轮播图数据
import { findBanner } from '@/api/home'
// 装轮播图组件的
export default {
  name: 'home-banner',
  data () {
    return {
      sliders: []
    }
  },
  async created () {
    const { result } = await findBanner()
    this.sliders = result
    console.log(this.sliders, 1)
  }
}
</script>

<style lang="less" scoped>
.home-banner {
  width: 1240px;
  height: 500px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 98;
  .xtx-carousel {
    ::v-deep .carousel-btn.prev {
      left: 270px;
    }
    ::v-deep .carousel-indicator {
      padding-left: 250px;
    }
  }
}
</style>
